<template>
  <div>
    <el-dialog
      title="账号授权提示"
      :visible.sync="showNext"
      width="420px"
      :modal-append-to-body="false"
    >
      <div class="text">授权即代表您同意通过矩阵猫系统：</div>
      <div class="flex mt">
        <img src="@/assets/images/checked.png" alt="" class="icon">
        <div class="text">
          往您的抖音账号发布公开作品（发布内容、频次由您通过矩阵猫系统操作设置）
        </div>
      </div>
      <div class="flex mt">
        <img src="@/assets/images/checked.png" alt="" class="icon">
        <div class="text">获取您的抖音账号信息、视频数据、评论等</div>
      </div>
      <div class="tip color-red">
        <div>重要提醒：</div>
        <div>
          1.生成的授权链接仅支持在PC端打开，然后使用手机扫码授权，直接使用手机打开将授权失败（无法授权视频发布的能力）
        </div>
        <div>
          2.“往您的抖音账号发布公开作品”权限，仅支持同时授权给1个平台，若此账号授权给其它平台此能力将失效，视频发布将失败！
        </div>
      </div>
      <div class="flex-c align-center mt">
        <el-button type="primary" @click="showNext=false;$emit('ok',type);">同意授权</el-button>
      </div>
    </el-dialog>
    <el-dialog
      title="抖音授权"
      :visible.sync="show"
      width="310px"
      :modal-append-to-body="false"
    >
      <div class="flex-a align-center">
        <!-- team,person,employee -->
        <el-button type="primary" @click="show=false;showNext = true;type='team'">企业号</el-button>
        <el-button type="primary" @click="show=false;showNext = true;type='employee'">员工号</el-button>
        <el-button type="primary" @click="show=false;showNext = true;type='person'">个人号</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
export default {
  data() {
    return {
      show: false,
      showNext: false,
      type: ''
    }
  },
  methods: {
    open() {
      this.show = true
    },
    close() {
      this.show = false
    }
  }
}
</script>
<style lang="scss" scoped>
.icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-right: 18px;
}
.text {
  font-size: 14px;
  font-weight: 400;
  line-height: 28.96px;
}
.mt {
  margin-top: 18px;
}
.tip {
  font-size: 14px;
  font-weight: 400;
  line-height: 21.72px;
  color: rgba(212, 48, 48, 1);
  margin-top: 36px;
}
</style>
